
#####################
REPLICATION MATERIALS
#####################

AUTHORS: Opacic, Aleksei and Lucy Song
ARTICLE: "Democratic Credibility Revisited"
UPDATED: December 14, 2020
CONTACT: aopacic@g.harvard.edu or lucysong@g.harvard.edu

INSTRUCTIONS:

Please unzip all files and put them in the same folder (keep all folders in the unzipped file as they are).

To prepare the data, please run 01a, 01b, 02a, 02b, 02c, and 03 in that order.

To reproduce all figures, please run 04. Line numbers for specific analyses are annotated.

To reproduce the results in the Appendices, please run 05.

Make sure to change the working directory of each file.

NOTE: 04_Analyses should take approximately 2.5 hours to run. We recommend that you watch The Holiday or another Christmas movie while you're at it. 


SOFTWARE:

To run the R files you will need a current version of R (we used R 3.6.3 )

R PACKAGES used: 

- tidyverse
- caret
- haven
- stringr
- survey
- splines
- rlang
- lmtest
- sandwich
- broom)
- MASS
- matrixStats
- naniar
- VIM
- mice
- ggpub
- xgboost
- BART
- gbm

FILE DESCRIPTIONS:
Replication_Script_1.R - Replication of Downes and Sechser (2012)
01a_MCT_More_Variables.R - Collation of additional variables for MCT (M=1)
01b_MIDS_More_Variables.R - Collation of MCT variables for MIDS (M=0)
02a_MCT_with_new_variables.R - Merging MCT with extra variables
02c_Case_Cohort.R - Construction of Random dyad selection 
02d_Case_Cohort_with_new_vars.R - Merging 02c with additional variables
03b_prep_MCT_case_control.R - Merging 02d with additional variables
04_Analyses.R. - all analyses in main paper
05_Appendices - all appendices in main paper

NOTE:
If you have any further questions concerning the replication materials, please send an email to Aleksei Opacic (aopacic@g.harvard.edu) or Lucy Song(lucysong@g.harvard.edu).



